home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / apm / event.d / laptop-mode < prev    next >
Encoding:
Text File  |  2006-10-06  |  1.2 KB  |  40 lines

  1. #!/bin/sh
  2.  
  3. # This file is part of laptop-mode-tools.
  4. #
  5. # Adaptation for laptop mode is Copyright (c) 2004 Bart Samwel
  6. # Copyright (c) 2000-2002 Massachusetts Institute of Technology
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16. # General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  21. # 02111-1307, USA.
  22.  
  23. set -e
  24.  
  25. LMODE=/usr/sbin/laptop_mode
  26.  
  27. [ -x "${LMODE}" ] || exit 0
  28.  
  29. if [ "${1}" = "start" ]; then
  30.     ${LMODE} auto
  31. elif [ "${1}" = "resume" ] && [ "${2}" != "standby" ]; then
  32.     ${LMODE} auto
  33. elif [ "${1},${2}" = "change,power" ]; then
  34.     ${LMODE} auto
  35. elif [ "${1}" = "stop" ]; then
  36.     ${LMODE} stop
  37.  
  38. fi
  39. exit 0
  40.